#include <cstdlib>
#include <string>
#include <iostream>
#include <vector>
#include <map>
using namespace std;


class Solution {
public:
	int compareVersion(string version1, string version2) {
		string sub1;
		string sub2;
		int posit1 = version1.find('.');
		int posit2 = version2.find('.');
		if (posit1 == string::npos && posit2 == string::npos){
			if (std::stoi(version1) > std::stoi(version2))
				return 1;
			else if (std::stoi(version1) < std::stoi(version2))
				return -1;
			else
				return 0;
		}
		else if (posit1 == string::npos){
			version1 = version1 + ".0";
			return compareVersion(version1, version2);
		}
		else if (posit2 == string::npos){
			version2 = version2 + ".0";
			return compareVersion(version1, version2);
		}
		else{
			sub1 = version1.substr(0, posit1);
			sub2 = version2.substr(0, posit2);
			if (std::stoi(sub1) > std::stoi(sub2))
				return 1;
			else if (std::stoi(sub1) < std::stoi(sub2))
				return -1;
			else
				return compareVersion(version1.substr(posit1 + 1, version1.length()),
				version2.substr(posit2 + 1, version2.length()));
		}
	}
};

int main(int argc, char** argv){
	cout << Solution().compareVersion("1.1.1", "1.1") << endl;
	return 0;
}